const express = require('express');
const router = express.Router();
const common = require('./common');

const connection = common.mysqlConfig

router.post('/', (req, res, next) => {
  const params = req.body.id;
  const sql = `DELETE FROM MESSAGE_LIST WHERE ID = '${params}'`;

  connection.query(sql, (err, result) => {
    // 封装公共返回方法
    const data = common.resCommon1(err, result);
    res.json(data)
  })
})

module.exports = router;